package com.yjd.bi.jf.enums;

public enum JfOrderStatusEnum {

    UN_KNOW(-1, "未知"), 
    WAIT_PAY(0, "待支付"), 
    FINISH_PAY(1, "已支付"),
    FINISH_SEND(2, "已发货"),
    FINISH_ORDER(3, "已完成");

    private String desc;
    private int code;

    private JfOrderStatusEnum(Integer code, String desc) {
	this.code = code;
	this.desc = desc;
    }

    public String getDesc() {
	return desc;
    }

    public void setDesc(String desc) {
	this.desc = desc;
    }

    public int getCode() {
	return code;
    }

    public void setCode(int code) {
	this.code = code;
    }
    
    public static JfOrderStatusEnum getJfOrderStatusEnum(int code){
	JfOrderStatusEnum[] JfOrderStatusEnums = JfOrderStatusEnum.values();
	for(JfOrderStatusEnum s : JfOrderStatusEnums){
		if(s.getCode()==code){
			return s;
		}
	}
	return JfOrderStatusEnum.UN_KNOW;
}
}
